<template>
	<view class="container">
		<!-- 领券中心 -->
		<u-navbar leftIcon="arrow-left" @leftClick="back" title="领券中心" bg-color="#00000000" titleStyle="color:#fff"
			leftIconColor="#fff" placeholder></u-navbar>

		<view class="content">
			<!-- 背景 -->
			<view class="top-bg"></view>

			<view class="main">
				<view class="tab-content">
					<view class="list">
						<image src="../../static/images/coupon-center.png" mode=""></image>
						<view class="text">
							<view class="denomination">￥<text class="rmb">20</text></view>
							<view class="info">
								<view class="right">
									<view class="require">满200元可用</view>
									<view class="limit">仅限于xx加油站使用</view>
									<view class="term">2020.04.11—2023.05.11</view>
								</view>
								<view class="left">
									<view class="btn-no" @click="skip">领取</view>
								</view>
							</view>
						</view>
					</view>

					<view class="list">
						<image src="../../static/images/coupon-center.png" mode=""></image>
						<view class="text">
							<view class="denomination">￥<text class="rmb">20</text></view>
							<view class="info">
								<view class="right">
									<view class="require">满200元可用</view>
									<view class="limit">仅限于xx加油站使用</view>
									<view class="term">2020.04.11—2023.05.11</view>
								</view>
								<view class="left">
									<view class="btn-yes">已领取</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		methods: {
			// 返回上个页面
			back() {
				uni.navigateBack({});
			},
			//去优惠券
			skip(){
				uni.redirectTo({
					url:'./MyCoupon'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		position: absolute;
		top: 0;

		.top-bg {
			width: 750rpx;
			height: 400rpx;
			// background-image: url('http://www.img.ttblog.cn/car/header-bg.png');
			background-color: #3384FC;
			background-size: cover;
			// display: flex;
			// flex-direction: column;
			// align-items: center;
		}

		.main {
			transform: translateY(-170rpx);
			margin-top: -100rpx;
			padding: 0 20rpx;
			box-sizing: border-box;

			.tab-content {
				background-color: #fff;
				border-radius: 20rpx;
				padding: 35rpx 30rpx;
				padding-bottom: 5rpx;
				box-sizing: border-box;
				position: relative;
				margin-top: 20rpx;

				.list {
					image {
						position: absolute;
						width: 92%;
						height: 230rpx;
					}

					.text {
						position: relative;
						z-index: 1;
						height: 230rpx;
						padding: 35rpx;
						box-sizing: border-box;
						margin-bottom: 25rpx;
						display: flex;
						flex-direction: row;
						align-items: center;

						.denomination {
							color: #fff;
							font-size: 32rpx;
							font-weight: 100;

							.rmb {
								font-size: 80rpx;
								font-weight: bold;
							}
						}

						.info {
							display: flex;
							flex-direction: row;
							margin-left: 50rpx;

							.right {
								.require {
									font-size: 35rpx;
									font-weight: bold;
									color: #FF8E69;
									margin-bottom: 15rpx;
								}

								.limit {
									font-size: 22rpx;
									font-weight: bold;
									margin-bottom: 50rpx;
								}

								.term {
									font-size: 22rpx;
									color: #a3a3a3;
								}
							}

							.left {
								position: absolute;
								right: 30rpx;
								top: 50%;
								transform: translateY(-50%);

								.btn-no {
									background-color: #FF8E69;
									padding: 10rpx 0;
									width: 150rpx;
									text-align: center;
									border-radius: 60rpx;
									color: #fff;
								}

								.btn-yes {
									background-color: #ccc;
									padding: 10rpx 0;
									width: 150rpx;
									text-align: center;
									border-radius: 60rpx;
									color: #fff;
								}
							}
						}
					}
				}

				.tab-three {
					image {
						filter: grayscale(100%);
					}
				}
			}


			.placeholder {
				height: 15.33vw;
			}

			/deep/ .u-button {
				width: 80%;
				background-color: #D9D9D9;
				color: #fff;
			}
		}
	}
</style>